<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>pregressbar03</title>
</head>

<body>
<style type="text/css">
    /*.progress {*/
        /*height: 20px;*/
        /*border: 1px solid pink;*/
    /*}*/
    /*.bar_span{*/
        /*display:block;*/
        /*width: 0%;*/
        /*height:20px;*/
        /*background: green;*/
    /*}*/
    .progress {
        height: 11px;
        background: #E7E7E7;
        border-radius: 35px;
        margin: 0 16px 5px;

    }
    .bar_span{
        display: block;
        width: 0%;
        height: 11px;
        background: #04aeda;
    }
</style>

<script type="text/javascript" src="js/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
    $(function () {
        $(".bar_span").each(function () {
            var ress = $(this).attr('width');
            var len=ress+"%";
            console.log(len);
            $(this).animate({
                width:len
            });

        })

    })
</script>

<h1>Javascript 进度条 Demo</h1>
<p>原理就是使用 Javascript 控制 SPAN CSS 的宽度（以及其他的样式）</p>
<div class="progress"><span  class="bar_span" width="10"> </span></div>
<div class="progress"><span  class="bar_span" width="20"> </span></div>
</body>
</html>